package simulation;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JTextArea;

public class View extends JPanel{

	private static final long serialVersionUID = 1L;
	
	public JTextArea time;
	
	public JProgressBar waitB;
	public JProgressBar B;

	public JProgressBar waitC;
	public JProgressBar C;
	
	public JProgressBar waitD;
	public JProgressBar D;
	
	public JProgressBar P1;
	public JProgressBar P2A;
	public JProgressBar P2B;
	public JProgressBar P3;
	public JProgressBar P4;
	
	public View(){
		
		waitB = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		B = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		waitC = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		C = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		waitD = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		D = new JProgressBar(JProgressBar.HORIZONTAL,0,200);
		P1 = new JProgressBar(JProgressBar.HORIZONTAL,0,100);
		P2A = new JProgressBar(JProgressBar.HORIZONTAL,0,100);
		P2B = new JProgressBar(JProgressBar.HORIZONTAL,0,100);
		P3 = new JProgressBar(JProgressBar.HORIZONTAL,0,100);
		P4 = new JProgressBar(JProgressBar.HORIZONTAL,0,100);
		
		
		JPanel p2 = new JPanel();
		p2.add(new JLabel("Teleski B"));p2.add(B);p2.add(waitB);p2.add(new JLabel(" Attente"));
		JPanel p3 = new JPanel();
		p3.add(new JLabel("Teleski C"));p3.add(C);p3.add(waitC);p3.add(new JLabel(" Attente"));
		JPanel p4 = new JPanel();
		p4.add(new JLabel("Teleski D"));p4.add(D);p4.add(waitD);p4.add(new JLabel(" Attente"));
		JPanel p5 = new JPanel();
		p5.add(new JLabel("Piste 1 "));p5.add(P1);
		JPanel p6 = new JPanel();
		p6.add(new JLabel("Piste 2A"));p6.add(P2A);
		JPanel p7 = new JPanel();
		p7.add(new JLabel("Piste 2B"));p7.add(P2B);
		JPanel p8 = new JPanel();
		p8.add(new JLabel("Piste 3 "));p8.add(P3);
		JPanel p9 = new JPanel();
		p9.add(new JLabel("Piste 4 "));p9.add(P4);
		
		time = new JTextArea();
		time.setBackground(Color.BLACK);
		Font f = new Font("Arial", Font.PLAIN, 12);
		time.setFont(f);
		time.setForeground(Color.WHITE);
		time.setEditable(false);
		
		setLayout(new GridLayout(12,1));
		add(new JLabel(" "));
		add(p2);
		add(p3);
		add(p4);
		add(new JLabel(" "));
		add(p5);
		add(p6);
		add(p7);
		add(p8);
		add(p9);
		add(new JLabel(" "));
		add(time);
		
		setPreferredSize(new Dimension(600,600));
		
	}
}
